package com.caishi.lkx.user.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.caishi.lkx.user.model.AgentUserModel;
import com.zzw.common.exception.BizException;
import com.zzw.common.service.NameService;
import com.zzw.common.service.service.ITreeModelService;
import com.caishi.lkx.user.ienum.type.AgentRechargeType;
import com.caishi.lkx.user.ienum.type.UserAccountType;

import java.util.List;
import java.util.Map;


public interface IAgentUserService extends IUserService<AgentUserModel>, ITreeModelService<AgentUserModel, String>,NameService<AgentUserModel, String> {


    AgentUserModel addUser(AgentUserModel model, List<String> roleIds,  List<String> positionCodes, String username , String password, UserAccountType loginType) throws BizException;

    IPage<AgentUserModel> search(Map<String, Object> param, Page<AgentUserModel> page, Boolean total);
    List<AgentUserModel> searchList(Map<String, Object> param,long size);


    //充值
    Boolean recharge(String id, Long money, AgentRechargeType type) ;
    //退款
    Boolean refuse(String id, Long money,String remark) ;
    //消费
    Boolean cosumer(String id, Long money,String remark) ;

    AgentUserModel getMainInfo(String createdBy);

    String getMainId(String userId);
    Boolean syncAgentUserToDistribute();
}
